import { stringify } from 'qs';
import request from '../utils/request';

export async function sqlSummary(params) {
  return request(`/analytics/sql_summary.json?${stringify(params)}`);
}

export async function getSqlData(params) {
  return request(`/analytics/sqls.json?${stringify(params)}`);
}

export async function sqlHistogram(params) {
  return request(`/analytics/sql_histogram.json?${stringify(params)}`);
}

export async function sqlHistogramItem(params) {
  return request(`/analytics/sql_histogram_item.json?${stringify(params)}`);
}
